<!DOCTYPE html>
<script src='../../../../../resources/gesture-util.js'></script>
<style>
  body, html {
    width: 100%;
    height: 100%;
    margin: 0;
    background-color: red;
  }
  ::-webkit-scrollbar {
    width: 0;
    height: 0;
  }
  div {
    width: 50vw;
    height: 50vh;
    position: absolute;
    left: 0;
    top: 50vh;
    background-color: green;
    border: 5px solid black;
    box-sizing: border-box;
  }
</style>

<div></div>

<script>
  window.onload = async () => {
    if (!internals)
      return;

    testRunner.waitUntilDone();
    internals.setPageScaleFactor(2);

    // Test that panning the visual viewport works when zoomed in.
    await waitForCompositorCommit();
    await smoothScroll(600, 400, 300, GestureSourceType.TOUCHPAD_INPUT, "down", SPEED_INSTANT);
    await waitForCompositorCommit();

    testRunner.notifyDone();
  }
</script>
